package homework.extendwork2.coding;

public class Car {
    private  String strBrand;
    private  String strColor;
    private int intWheel;
    private int intSeat;
    {
        this.intWheel=2;
        this.intSeat=1;
        System.out.println("gouzao ");
    }
    public Car(){

    }

    public Car( String strBrand,String strColor){
        this.setStrBrand(strBrand);
        this.setStrColor(strColor);
        System.out.println("2can");
    }
    public Car( String strBrand,String strColor,int intWheel,int intSeat){
        this.setStrBrand(strBrand);
        this.setStrColor(strColor);
        this.setIntSeat(intSeat);
        this.setIntWheel(intWheel);
    }
    public void show(){

        System.out.printf("这是一辆%s颜色的，%s牌的，有%d个轮子，有%d个座椅",this.getStrColor(),this.getStrBrand(),
                this.getIntWheel(),this.getIntSeat());

    }


    public String getStrBrand() {
        return strBrand;
    }

    public void setStrBrand(String strBrand) {
        this.strBrand = strBrand;
    }

    public String getStrColor() {
        return strColor;
    }

    public void setStrColor(String strColor) {
        this.strColor = strColor;
    }

    public int getIntWheel() {
        return intWheel;
    }

    public void setIntWheel(int intWheel) {
        this.intWheel = intWheel;
    }

    public int getIntSeat() {
        return intSeat;
    }

    public void setIntSeat(int intSeat) {
        this.intSeat = intSeat;
    }
}
